package com.dragon.mmochat.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

//程序退出前的处理
public class MmochatExitService {
	private static Logger log = LoggerFactory
			.getLogger(MmochatExitService.class);

	public MmochatExitService() {
		Runtime.getRuntime().addShutdownHook(new Thread() {
			public void run() {
				try {
					doBeforeExit();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public void doBeforeExit() {
		System.out.println("--------------游戏正常退出!");
	}
}
